package com.geo.smallcredit.MainApplication;

import java.util.LinkedList;
import java.util.List;

import android.app.Activity;

public class ActivityManager {
	private static List<Activity> mListStart = new LinkedList<Activity>();
	private static List<Activity> mListCamera = new LinkedList<Activity>();
	private static List<Activity> mListBind = new LinkedList<Activity>();
	
	public static void addToStart(Activity activity) {
		mListStart.add(activity);
	}
	
	public static void addToCamera(Activity activity) {
		mListCamera.add(activity);
	}
	
	public static void addToBind(Activity activity) {
		mListBind.add(activity);
	}
	
	public static void clearBind() {
		for (Activity item : mListBind) {
			if (item != null)
				item.finish();
		}
		mListBind.clear();
	}
	
	public static void clearStart() {
		for (Activity item : mListStart) {
			if (item != null)
				item.finish();
		}
		mListStart.clear();
	}

	public static void clearCamera() {
		for (Activity item : mListCamera) {
			if (item != null)
				item.finish();
		}
		mListCamera.clear();
	}
}
